package com.bmsbosmpa.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bmsbosmpa.entity.Book;
import com.bmsbosmpa.service.implement.BookService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class BookServiceTestCase {

    @Autowired
    private BookService bookService;

    @Test
    public void ToPageTest() {
        IPage<Book> page = new Page<Book>(2, 5);
        bookService.page(page);
        System.out.println("total records num is" + page.getTotal());
    }
}
